﻿@model SportStore.Models.ProductsListViewModel
@using SportStore.HtmlHelpers
@{
    Layout = null;
    ViewBag.Title = "Products";
}

<script type="text/javascript">
    $(function () {
        $(".changeItemsPerPage").val($.cookie("itemsPerPage"));
    });
</script>

<h2>List</h2>
<div class="pager" style="border:none;">
@Html.PageLinks(Model.PagingInfo,Model.Category,x=>Url.Action("List",new { category=Model.Category, page=x }))
</div>
@if (Model.PagingInfo.TotalItems>0)
{
foreach (var p in Model.Products)
 {
     Html.RenderPartial("ProductSummary", p);
 }
}
<div class="pager">
@Html.PageLinks(Model.PagingInfo,Model.Category,x=>Url.Action("List",new { category=Model.Category, page=x }))
</div>
